package com.soft.mainsite.mybatis.mapper;

import com.soft.mainsite.mybatis.model.TCmsAdSilder;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * TCmsAdSilderMapper
 *
 * @author Jin
 * @create 2017-06-16
 **/
public interface TCmsAdSilderMapper extends Mapper<TCmsAdSilder> {

    /**
     * 主站批量添加首页幻灯
     *
     * @param adSilderList
     * @return
     */
    int insertMoreSilder(List<TCmsAdSilder> adSilderList);

    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
    int deleteMoreSilder(Integer[] ids);

    /**
     * 根据推送id删除所有主机推送信息
     *
     * @param pushId
     * @return
     */
    int deleteByPushId(@Param("pushId") Integer pushId);

    /**
     * 根据推送id查询所有站点id
     *
     * @param pushId
     * @return
     */
    List<Integer> selectSiteIdByPushId(@Param("pushId") Integer pushId);

    /**
     * 查询初始化首页幻灯（主站前四条）
     *
     * @param siteId
     * @return
     */
    List<TCmsAdSilder> selectInitSilder(@Param("siteId") Integer siteId);

    /**
     * 通过站点id删除站点id
     *
     * @param siteIds
     * @return
     */
    int deleteMoreBySiteId(List<Integer> siteIds);
}